﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SIAKADCORE.Helpers
{
    public abstract class SymmetricEncryptionUtility
    {
        protected string password;
        protected string salt;

        public SymmetricEncryptionUtility()
        {

        }

        public SymmetricEncryptionUtility(string salt)
        {
            this.salt = salt;
        }

        public SymmetricEncryptionUtility(string password, string salt)
        {
            this.SetPassword(password);
            this.SetSalt(salt);
        }

        public void SetPassword(string password)
        {
            this.password = password;
        }

        public void SetSalt(string salt)
        {
            this.salt = salt;
        }

        public abstract string Encrypt(string plaintext);
        public abstract string Decrypt(string encryptedText);
    }
}
